package com.wyz.tracing.domain.entity.tracing.different.field;

import com.wyz.tracing.enums.DifferenceType;
import lombok.Getter;
import lombok.Setter;

import java.lang.reflect.Type;

/**
 * @author wyz
 * @version 1.0
 * @date 2023/8/15
 */
@Getter
@Setter
public class FieldDifference {

    private String name;

    private Type type;

    private Object snapshotValue;

    private Object tracValue;

    private DifferenceType differenceType;

    public FieldDifference(String name, Type type, Object snapshotValue, Object tracValue) {
        this.name = name;
        this.type = type;
        this.snapshotValue = snapshotValue;
        this.tracValue = tracValue;

    }

    public FieldDifference(String name, Type type, Object snapshotValue, Object tracValue, DifferenceType differenceType) {
        this.name = name;
        this.type = type;
        this.snapshotValue = snapshotValue;
        this.tracValue = tracValue;
        this.differenceType = differenceType;
    }
}
